package com.luke.system.service.impl;

import java.util.List;
import com.luke.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luke.system.mapper.TbDatasMapper;
import com.luke.system.domain.TbDatas;
import com.luke.system.service.ITbDatasService;

/**
 * tbDatasService业务层处理
 * 
 * @author luke
 * @date 2021-06-23
 */
@Service
public class TbDatasServiceImpl implements ITbDatasService 
{
    @Autowired
    private TbDatasMapper tbDatasMapper;

    /**
     * 查询tbDatas
     * 
     * @param id tbDatasID
     * @return tbDatas
     */
    @Override
    public TbDatas selectTbDatasById(Long id)
    {
        return tbDatasMapper.selectTbDatasById(id);
    }

    /**
     * 查询tbDatas列表
     * 
     * @param tbDatas tbDatas
     * @return tbDatas
     */
    @Override
    public List<TbDatas> selectTbDatasList(TbDatas tbDatas)
    {
        return tbDatasMapper.selectTbDatasList(tbDatas);
    }

    /**
     * 新增tbDatas
     * 
     * @param tbDatas tbDatas
     * @return 结果
     */
    @Override
    public int insertTbDatas(TbDatas tbDatas)
    {
        tbDatas.setCreateTime(DateUtils.getNowDate());
        return tbDatasMapper.insertTbDatas(tbDatas);
    }

    /**
     * 修改tbDatas
     * 
     * @param tbDatas tbDatas
     * @return 结果
     */
    @Override
    public int updateTbDatas(TbDatas tbDatas)
    {
        return tbDatasMapper.updateTbDatas(tbDatas);
    }

    /**
     * 批量删除tbDatas
     * 
     * @param ids 需要删除的tbDatasID
     * @return 结果
     */
    @Override
    public int deleteTbDatasByIds(Long[] ids)
    {
        return tbDatasMapper.deleteTbDatasByIds(ids);
    }

    /**
     * 删除tbDatas信息
     * 
     * @param id tbDatasID
     * @return 结果
     */
    @Override
    public int deleteTbDatasById(Long id)
    {
        return tbDatasMapper.deleteTbDatasById(id);
    }

    @Override
    public List<TbDatas> selectTbDatasList1(List<String> q) {
        return tbDatasMapper.selectTbDatasList1(q);
    }
}
